package com.galacticconversion.command;

import com.galacticconversion.model.DataStorage;

/**
 * 处理单位定义命令 (如 "glob is I")
 */
public class UnitDefinitionCommand implements Command {
    private final DataStorage dataStorage;

    public UnitDefinitionCommand(DataStorage dataStorage) {
        this.dataStorage = dataStorage;
    }

    @Override
    public void execute(String input) {
        String[] parts = input.split(" is ");
        dataStorage.getGalacticToRoman().put(parts[0], parts[1].charAt(0));
    }
}